/*
 * Copyright 2008 Nathan C Jones
 * 
 * This file is part of Fivehundred.
 * 
 * Fivehundred is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * Fivehundred is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * Fivehundred. If not, see <http://www.gnu.org/licenses/>. 
 */

package com.googlecode.fivehundred.model;

import java.awt.Image;

/**
 * A card renderer generates images for a card.
 * 
 * @author Nathan C Jones
 */
public interface CardRenderer {

	/** The default width of a card image. */
	static final int DEFAULT_WIDTH = 180;

	/** The default height of a card image. */
	static final int DEFAULT_HEIGHT = 256;

	/**
	 * Get an image of a card. The dimensions of the returned image will be equal
	 * to the default width and height.
	 * 
	 * @return the image of a card with default dimensions.
	 */
	Image getImage();

	/**
	 * Get an image of a card. The image's dimensions will match those provided.
	 * 
	 * @param width the width of the image to create.
	 * @param height the height of the image to create.
	 * @return the image of a card with the given dimensions.
	 * @throws IllegalArgumentException if the height or width are negative.
	 */
	Image getImage(int width, int height);
}
